
package com.ttomato.game.framework.gl;

import android.util.Log;

public class FPSCounter {
    long mStartTime = System.nanoTime();
    int mFrames = 0;

    public void logFrame() {
        mFrames++;

        if (System.nanoTime() - mStartTime > 1000000000) {
            Log.d("FPSCounter", "fps: " + mFrames);
            mFrames = 0;
            mStartTime = System.nanoTime();
        }
    }
}
